data class Coordinate02(var x:Int, var y:Int) {
    //重载
    operator fun plus(other:Coordinate02) = Coordinate02(x + other.x, y + other.y)
}

fun main() {
    val c1 = Coordinate02(10, 20)
    val c2 = Coordinate02(2,9)
    //使用运算符重载后可以直接+data对象
    println(c1 + c2)
}